Sub ZapObsoleteMessages()
Dim rst1 As New Recordset

'Open the table with the target e-mail senders
With rst1
     .ActiveConnection = CurrentProject.Connection
     .Open "EmailDelete"
End With

'Process all table records to delete obsolete messages
Do Until rst1.EOF
     DeleteObsolete (rst1.Fields(0))
     rst1.MoveNext
Loop

'Clean up before exiting
rst1.Close
Set rst1 = Nothing

End Sub
